const install = (Vue, vm) => {
	// 将各个定义的接口名称，统一放进对象挂载到vm.$u.api(因为vm就是this，也即this.$u.api)下
	vm.$u.api = {
		// 登录
		login: (params = {}) => vm.$u.post('/pda/login', params),
		logout: (params = {}) => vm.$u.delete('/auth/token/logout', params),

		// 用户信息
		getUserInfo: () => vm.$u.get('/getInfo'),

		//登陆时根据输入的用户名获取仓库选择框列表
		getOptionBranchByUserName: (params = {}) => vm.$u.get('/system/branch/optionBranchByUserName/' + params
			.userName),
	};

}

export default {
	install
}
